<template>
<!-- 首页 -->
<div class="stu">

    <mu-paper @click="go(i)" class="demo-paper" :z-depth="1" v-for="i in tabbox">{{txtlv(i)}}</mu-paper>

</div>
</template>
<script>
import {
  Notify
} from 'vant';
export default {
  name: 'home',
  components: {},
  computed: {
      txtlv(){//过滤。txt
          return (i)=> i.replace(".txt","");
      }
  },
  data() {
    return {
        tabbox:[],
    }
  },
  methods: {
      go(i){
          this.$store.state.titletxt = this.txtlv(i);
         this.$router.push({path:'/do',query:{name:i}});
      },
    git_data() { //
      let pams = {}
      this.$get('/d/pat', pams).then(res => {
          if(res.code===200){
              this.tabbox = res.data
          }
      });
    }
  },
  mounted() {
      this.git_data();
      this.$store.state.btnnum = 0;
  }
}
</script>
<style scoped="scoped">
 .demo-paper{
     width:95%;
     height:1.33rem  /* 100/75 */;
     margin: 0.3rem auto;
     padding-left:0.5rem;
     line-height: 1.33rem;
 }

.stu {
  width: 100%;
  padding-top: 0.1rem;
}
</style>
